window.Log = (function () {

    var _static = {
        info: function (str1, str2) {
            if (SystemInfo.getLogInfo() == "NONE") {
                return;
            }
            console.log(this.getNowTime() + " ssg-log [info]:  " + str1 + "  " + (str2 ? str2 : ""));
        },

        debug: function (str1, str2) {
            if (SystemInfo.getLogInfo() == "NONE" || SystemInfo.getLogInfo() == "INFO") {
                return;
            }
            console.log(this.getNowTime() + " ssg-log [debug]:  " + str1 + "  " + (str2 ? str2 : ""));
        },

        error: function (str1, str2) {
            if (SystemInfo.getLogInfo() == "NONE") {
                return;
            }
            console.log(this.getNowTime() + " ssg-log [error]:  " + str1 + "  " + (str2 ? str2 : ""))
        },

        getNowTime: function () {
            // let date = new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
            let date = "";
            return date;
        }
    }
    return _static;

})();

module.exports = Log;